80153: xfi:precision

Documentation

Test the functionality of the xfi:precision function.

Owners

Name Affiliation Email Start End
Herm Fischer UBMatrix / Mark V Systems fischer@markv.com 19-02-2008 at 00:00:00

References

http://www.xbrl.org/Specification/XF-PWD-2006-12-07.htm#_Toc152670664

Test Case Variations


V-01 Returns error for a non-numeric concept

Documentation

The concept has an xbrli:stringItemType data type.

Inputs

Outputs

  • Error code: xfie:ItemIsNotNumeric

V-02 Precision is 3 for 400, reported as decimals 0

Documentation

Inputs

Outputs

  • Result test: $result instance of xs:nonNegativeInteger and $result eq 3

V-03 Precision is INF for 400, reported as decimals INF

Documentation

Inputs

Outputs

  • Result test: $result instance of xs:string and $result eq 'INF'

V-04 Precision is 0 for 400, reported at precision 0

Documentation

Inputs

Outputs

  • Result test: $result instance of xs:nonNegativeInteger and $result eq 0

V-05 Precision is 4 for 400, reported at precision 4

Documentation

Inputs

Outputs

  • Result test: $result instance of xs:nonNegativeInteger and $result eq 4

V-06 Returns "INF" for a fraction concept

Documentation

The concept has an xs:fractionItemType data type.

Inputs

Outputs

  • Result test: $result instance of xs:string and $result eq 'INF'

V-07 Returns error for a tuple concept

Documentation

The concept is a tuple.

Inputs

Outputs

  • Error code: xqt-err:XPTY0004

V-11 Xbrl spec 2.1 example 13 line 1

Documentation

Inputs

Outputs

  • Result test: $result instance of xs:nonNegativeInteger and $result eq 5

V-12 Xbrl spec 2.1 example 13 line 2

Documentation

Inputs

Outputs

  • Result test: $result instance of xs:nonNegativeInteger and $result eq 5

V-13 Xbrl spec 2.1 example 13 line 3

Documentation

Inputs

Outputs

  • Result test: $result instance of xs:nonNegativeInteger and $result eq 5

V-14 Xbrl spec 2.1 example 13 line 4

Documentation

Inputs

Outputs

  • Result test: $result instance of xs:nonNegativeInteger and $result eq 5

V-15 Xbrl spec 2.1 example 13 line 5

Documentation

Inputs

Outputs

  • Result test: $result instance of xs:nonNegativeInteger and $result eq 3

V-16 Xbrl spec 2.1 example 13 line 6

Documentation

Inputs

Outputs

  • Result test: $result instance of xs:nonNegativeInteger and $result eq 1

V-17 Xbrl spec 2.1 example 13 line 7

Documentation

Inputs

Outputs

  • Result test: $result instance of xs:nonNegativeInteger and $result eq 0

Revisions

Name On Details
Herm Fischer 19-02-2008 at 00:00:00 Created the test case.
Herm Fischer 05-04-2008 at 00:00:00 Corrected implied precision examples, added Example 13 from Spec v2.1.
Herm Fischer 22-06-2011 at 00:00:00 Added xmlns:xs.